<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@page import ="com.hs.hip.bean.init.UserAuthorityInfo" %>
<%@ page import="com.hs.hip.org.menu.*" %>
<%@ page import="com.hs.hip.common.*" %>
<%@ page import="com.hs.hip.org.api.OrgConstant" %>
<%@ page import="com.hs.hip.proxy.init.model.UserApplicationCount" %>
<%@ page import="com.hs.hip.proxy.init.LoginProxy" %>
<%@ page import="com.hs.hip.proxy.org.mng.model.AdditionalOfficerInfo" %>
<%@ page import="com.hs.hip.proxy.org.mng.UserProxy" %>
<%@ page import="com.hs.hip.proxy.org.login.LoginParseProxy" %>
<%@ include file ="/jsp/charHeader.jsp" %>
<%@ include file ="/jsp/Session.jsp" %>
<%@ include file ="/jsp/_inc/CacheControl_long.jsp" %>
<%@ include file="/jsp/main/inc/common.jsp" %>
<%
	response.setContentType("text/html;charset=utf-8");
	UserAuthorityInfo uai = (UserAuthorityInfo) session.getAttribute("UA");
	CommunityConf conf = CommunityConf.getCommunityConf();
	boolean bGPRelate = conf.bGPRelate;
	UserApplicationCount count = null;
	ArrayList retAttr = new ArrayList();

	try {
		if (conf.bUseMail
			&& !conf.bUseWebMail) {
			retAttr.add("MAIL=1"); // 메일 표시 여부
		}
		if (conf.bUseBBS) {
			if (conf.bBBS_NewMaterialCounting) {
				retAttr.add("BBS=1"); // 게시판 표시 여부
				if (conf.nMaterialPostAge != 0) // 게시기간
					retAttr.add("POSTAGE="
						+ conf.nMaterialPostAge);
				else
					retAttr.add("POSTAGE=1");

				if (conf.favoriteSearchFirst) //즐겨찾기 게시판
				{
					retAttr.add("BBSFAVFBRDCNT=1");
					retAttr.add("BBSFAVF=1");
				}
				if (conf.searchOnlyInDate)
					retAttr.add("BBSSOID=1");
			}
		}
		PropUtils pu = new PropUtils(conf.getGlobalProperties());
		// 5. 발송처리 표시
		session.setAttribute("EXAMPROC","0");
		if (uai.doesHaveAuth(OrgConstant.AUTH_DEPT_InController)
			|| // 발송 담당자
			uai.doesHaveAuth(OrgConstant.AUTH_REVIEWER_DEPUTY)) // 대리 발송 담당자
		{
			session.setAttribute("EXAMPROC","1");
		}

		session.setAttribute("RECVWAIT","0");
		session.setAttribute("ENABLERECEIPTDOC","0");
		if (uai.doesHaveAuth(OrgConstant.AUTH_RECVSEND_MANAGER)
			|| // 수발신 담당자
			uai.doesHaveAuth(OrgConstant.AUTH_RECVSEND_DEPUTY)) // 대리 수발신 담당자
		{
			session.setAttribute("RECVWAIT","1");
		} else {
			if ("1".equals(pu.getProperty("ENABLERECEIPTDOC", "0"))) {
				session.setAttribute("ENABLERECEIPTDOC","1");
			}
		}

		if ("1".equals(pu.getProperty("bUseSanc", "1"))) {
			if (conf.bGPRelate) {
				retAttr.add("APPR=GP"); //GP결재 표시 여부
				retAttr.add("USRAUTH=1"); // USRAUTH를 procedure에 넘김. 넘기지 않는 경우 DB에서 usr_auth에서 구하도록 해야한다.

				// 0. 문서함 부서ID
				retAttr.add("DOCDEPTID="
					+ uai.szDeptIDWithDocBox);

				// 1. 결재대기  표시
				retAttr.add("APPRWAIT=1");

				// 2. 공람대기 표시
				//    공람대기를 초기화면에 표시하려면 remark를 풀어야 합니다.
				if ("1".equals(pu.getProperty("CONDPUBLICWAIT", "1"))) {
					// 공람대기를 초기화면에 표시하려면 remark를 풀어야 합니다.
					retAttr.add("PUBLICWAIT=1");
					// 2-2. 결재대기함 참조(CONDPUBLICWAIT=0), 공람대기함 참조(CONDPUBLICWAIT=1)
					retAttr.add("CONDPUBLICWAIT=1");
				} else {
					retAttr.add("CONDPUBLICWAIT=0");
				}

				// 3. 발송대기 표시
				//    일괄기안을 사용하여 발송 대기의 건수를 초기화면에 표시하려면 아래 REMARK를 풀어야합니다.
				retAttr.add("MULTIPAPER=1"); // 일괄기안 사용
				retAttr.add("EXAMWAIT=1"); // 발송대기 표시

				// 4. 심사처리 표시
				//    심사처리를 사용하여 초기화면에 건수를 표시하려면 아래 REMARK를 풀어야합니다.

				if (uai.doesHaveAuth(OrgConstant.AUTH_DEPT_ReportControl)) //보고 담당자
				{
					retAttr.add("EXAMPROC2=1"); // 심사처리 표시
					retAttr.add("EXAM2=1");
					retAttr.add("AUTHREPORT=1");
				}
				if (uai.doesHaveAuth(OrgConstant.AUTH_DEPT_LawControl)) // 법규 담당자
				{
					retAttr.add("EXAMPROC2=1"); // 심사처리 표시
					retAttr.add("EXAM2=1");
					retAttr.add("AUTHEXAM=1");
				}

				// 5. 발송처리 표시
				if ("1".equals(session.getAttribute("EXAMPROC"))) // 대리 발송 담당자
				{
					retAttr.add("AUTHSEND=1");
					retAttr.add("EXAMPROC=1");// 발송처리 표시
				}

				/*              if(uai.doesHaveAuth(OrgConstant.AUTH_RECVSEND_MANAGER)) //수발신 담당자
				 {
				 retAttr.add("AUTHDOC=1");
				 retAttr.add("EXAMPROC=1");// 발송처리 표시
				 }
				 */

				// 6. 접수대기 표시
				//    전부서원이 접수가능이면 접수대기 표시를 위해 else 이하부분 remark를 풀어야 합니다.
				if ("1".equals(session.getAttribute("RECVWAIT")))  // 대리 수발신 담당자
				{
					retAttr.add("AUTHDOC=1");
					retAttr.add("RECVWAIT=1"); // 접수대기 표시
				} else {
					if ("1".equals(session.getAttribute("ENABLERECEIPTDOC")))  
					{
						retAttr.add("ALLRECEIVE=1"); // 전부서원 접수가능
						retAttr.add("RECVWAITING=1");
					}
				}

				// 7. 접수진행 표시
				//    접수진행건수를 초기화면에 건수를 표시하려면 아래 REMARK를 풀어야합니다.
				retAttr.add("RECVING=1");

				/* 대법원용
				// 8. 결재진행건수 표시
				retAttr.add("APPROVING=1");
				retAttr.add("SHOWONLYDONE=" + conf.bShowOnlyDone);
				*/
				retAttr.add("REPLYWAITING=1");
				 
				// 9. 개인접수 표시
				//    개인접수건수를 초기화면에 건수를 표시하려면 아래 REMARK를 풀어야합니다.
				retAttr.add("RECVUSER=1");
			} else {
				retAttr.add("SANCNEW=1");
				retAttr.add("SANCUNCHECK=1");
				retAttr.add("GONGRAM=1");
				if (uai.bIsSusinAdmin) {
					retAttr.add("SANCSUSHIN=1");
				}
			}
		}
		LoginParseProxy loginProxy = new LoginParseProxy(uai, application, request, response);

		count = loginProxy.getUserApplicationCount(application, request, response, uai.szKey, uai.szUserID, retAttr);
		if (bGPRelate
			&& "1".equals(pu.getProperty("SHOWOTHEROFFICERAPPRCOUNT", "0"))) {
			UserProxy uproxy = new UserProxy(uai, application, request, response);
			AdditionalOfficerInfo offs = uproxy.getAdditionalOfficerInfo(uai.szCommunityID, uai.szUserID);
			UserApplicationCount additionalCounts[] = new UserApplicationCount[offs.size()];
			HashMap additionalCountMap = new HashMap();
			for (int i = 0; i < offs.size(); i++) {
				additionalCounts[i] = loginProxy.getUserApplicationCount(application, request, response, uai.szKey,
						offs.getUserID(i), retAttr);
				additionalCountMap.put(offs.getUserID(i), additionalCounts[i]);
			}
			request.setAttribute("additionalCountMap", additionalCountMap);
		}
	}
	catch (Exception e) {
		count = new UserApplicationCount();
		com.hs.hip.common.HDLog.printStackTrace(e);
	}
	finally {}
%>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-compatible" content="IE=EmulateIE8"/>
<title>
<c:out value="${INI_SZBROWSERTITLE}" />
</title>
<link rel="stylesheet" type="text/css" href="/css/main/basic.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/main/layer_pop.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/main/jquery.noty.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/main/noty_theme_default.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/main/buttons.css" media="screen">
<link rel="stylesheet" type="text/css" href="/css/main/tl.css" media="screen">
<!-- organization -->
<script type="text/javascript">
	var bGPRelate = <%=bGPRelate%>;
	var default_list_count = <c:out value="${default_duty_list_count}"/>;
	var min_ago = "<fmt:message bundle='${common}' key='min_ago' />";
	var hour_ago = "<fmt:message bundle='${common}' key='hour_ago' />";
	var day_ago = "<fmt:message bundle='${common}' key='day_ago' />";
	var month_ago = "<fmt:message bundle='${common}' key='month_ago' />";
	var year_ago = "<fmt:message bundle='${common}' key='year_ago' />";
	var body_empty_list = "<fmt:message bundle='${common}' key='body_empty_list' />";
	var body_reply = "<fmt:message bundle='${common}' key='body_reply' />";
	var body_forward = "<fmt:message bundle='${common}' key='body_forward' />";
	var body_add_todo = "<fmt:message bundle='${common}' key='body_add_todo' />";
	var body_div_act_delete = "<fmt:message bundle='${common}' key='body_div_act_delete' />";
	var body_div_act_hidden = "<fmt:message bundle='${common}' key='body_div_act_hidden' />";
	var body_deleted_item = "<fmt:message bundle='${common}' key='body_deleted_item' />";
	var body_removed_item = "<fmt:message bundle='${common}' key='body_removed_item' />";
	
	var NOTCONNECT = "<fmt:message bundle='${common}' key='NOTCONNECT' />";
	var SECURITY_ERROR = "<fmt:message bundle='${common}' key='SECURITY_ERROR' />";
	var FAILURE = "<fmt:message bundle='${common}' key='FAILURE' />";
	var EXCEPTION = "<fmt:message bundle='${common}' key='EXCEPTION' />";
	var registered = "<fmt:message bundle='${common}' key='registered' />";
	var not_registered = "<fmt:message bundle='${common}' key='not_registered' />";
	
	
	var task_please_enter_title = "<fmt:message bundle='${common}' key='task_please_enter_title' />";
	var task_subject_so_long = "<fmt:message bundle='${common}' key='task_subject_so_long' />";
	var task_subject_invalid = "<fmt:message bundle='${common}' key='task_subject_invalid' />";
	var task_complete = "<fmt:message bundle='${common}' key='task_complete' />";
	var task_has_completed = "<fmt:message bundle='${common}' key='task_has_completed' />";
	var task_has_update = "<fmt:message bundle='${common}' key='task_has_update' />";
	var body_todo_add = "<fmt:message bundle='${common}' key='body_todo_add' />";
	
	var already_reply_poll = "<fmt:message bundle='${common}' key='already_reply_poll' />";
	var select_answer_poll = "<fmt:message bundle='${common}' key='select_answer_poll' />";

	var APP_Z0000000000000000001 = "<fmt:message bundle='${common}' key='APP_Z0000000000000000001' />";
	var APP_Z0000000000000000002 = "<fmt:message bundle='${common}' key='APP_Z0000000000000000002' />";
	var APP_Z0000000000000000003 = "<fmt:message bundle='${common}' key='APP_Z0000000000000000003' />";
	var APP_Z0000000000000000004 = "<fmt:message bundle='${common}' key='APP_Z0000000000000000004' />";
	var title_internal_mail = "<fmt:message bundle='${common}' key='title_inamil' />";
	var title_external_mail = "<fmt:message bundle='${common}' key='title_extmail' />";
	var view_more = "<fmt:message bundle='${common}' key='body_view_more' />";
	var view_top = "<fmt:message bundle='${common}' key='body_view_top' />";
	var count_itme = "";

	// Groupware value
	var GPSaveDocDeptID = '<%=uai.szDeptIDWithDocBox%>';
	var GPSaveDocDeptName = '<%=uai.szDeptNameWithDocBox%>';
	var UserDeptID = '<c:out value="${UA.deptID}"/>';
	var GPIP = '<c:out value="${INI_SZGPIP}"/>';
	var GPPORT = '<c:out value="${INI_NGPPORT}"/>';
	var GPURL = '<c:out value="${INI_SZGPURL}"/>';
	var isDocAdmin = '<c:out value="${UA.munAdmin}"/>';
	var isSimsaJa = '<c:out value="${UA.simsaAdmin}"/>';
	var isOrgAdmin = '<c:out value="${UA.orgSancAdmin}"/>';
	var isSusinAdmin = '<c:out value="${UA.susinAdmin}"/>';
	var isManager = '<c:out value="${UA.manager}"/>';
	var isAbsent = '<%=uai.isAbsent%>';
	var UserID = parseInt("<c:out value="${UA.userID}"/>",10);
	var BWURL = '<c:out value="${INI_SZWEBSERVER_URL}"/>';
	var szKEY = "<c:out value="${UA.key}"/>" ;
	var user_id	= '<c:out value="${UA.userID}"/>';
	var community_id = '<%=uai.szCommunityID%>';
	var preLinkedAnchor = null;

	//Timeline selectbox state
	var useTimelineMail = <%=conf.bUseTimelineMail%>;
	var useTimelineApproval = <%=conf.bUseTimelineApproval%>;
	var useTimelineWorknet = <%=conf.bUseTimelineWorknet%>;
	var useTimelineBoard = <%=conf.bUseTimelineBoard%>;
	
	if (isAbsent == 'true') {
		alert('<fmt:message bundle="${common}" key="init.absencemsg"/>');
	}
	<c:choose>
		<c:when test="${empty INI_BUSESNS || INI_BUSESNS eq '1'}">
	var useSNS = true;
		</c:when>
		<c:otherwise>
	var useSNS = false;
		</c:otherwise>
	</c:choose>
	
	<c:choose>
		<c:when test="${INI_BUSETIMELINE eq '1'}">
	var useTimeLine = true;
		</c:when>
		<c:otherwise>
	var useTimeLine = false;
		</c:otherwise>
	</c:choose>
	
<%
	String apprCnt[][] = new String[][] {
					{ "APPRWAIT", "" },
					{ "PUBLICWAIT", "" },
					{ "EXAMWAIT", "" },
					{ "EXAMPROC", "" },
					{ "EXAMPROC2", "" },
					{ "RECVWAIT", "" },
					{ "RECVING", "" },
					{ "APPROVING", "" },
					{ "REPLYWAITING", "" },
					{ "RECVUSER", "" }
	};
%>
	var board_id = '000001000';

	function doMenuLoad2(doctype) {
		switch_main('SANC')

		var isdocadmin = "true";
		var issimsaja = "true";
		var usu = "<c:out value="${UA.userID}"/>";
		var menumask = 1;
		var confhtml = '';
		var onmenu = '';

		if (isdocadmin == 'true')
			menumask += 2;
		if (issimsaja == 'true')
			menumask += 4;
		switch (doctype) {
			case 'APPRWAIT': // 결재대기
				url = '/bms/act_call_fldr.jsp?APPLID=2010';
				break;
			case 'PUBLICWAIT': // 공람대기
				url = '/bms/act_call_fldr.jsp?APPLID=2010';
				break;
			case 'EXAMWAIT': // 발송대기
				url = '/bms/act_call_fldr.jsp?APPLID=4030';
				break;
			case 'EXAMPROC': // 발송처리
				url = '/bms/act_call_fldr.jsp?APPLID=4010';
				break;
			case 'EXAMPROC2': // 심사처리
				url = '/bms/act_call_fldr.jsp?APPLID=4040';
				break;
			case 'RECVWAIT': // 접수대기
				url = '/bms/act_call_fldr.jsp?APPLID=5010';
				break;
			case 'RECVUSER': // 개인접수
				url = '/bms/act_call_fldr.jsp?APPLID=5110';
				break;
			case 'RECVING':// 수신반송
				url = '/bms/act_call_fldr.jsp?APPLID=5020';
				break;
			case 'REPLYWAITING': // 회신대기
				url = '/bms/act_call_fldr.jsp?APPLID=5070';
				break;
			default:
				url = '/bms/act_call_fldr.jsp?APPLID=2010';
				break;
		}
		url += '&USU=' + usu;

		if (isdocadmin == 'true') {
			url += '&$DOCADMIN$=1';
		} else {
			url += '&$DOCADMIN$=0';
		}
		url += '&K=' + szKEY;
		url += '&DEPTID=' + GPSaveDocDeptID;
		url += '&USERDEPTID=' + UserDeptID;
		//alert(url)
		this.location = getRefreshURL(url);
	}
</script>
<script type="text/javascript" src="/js/lib/jQuery/jquery-1.7.2.js"></script>
<script type="text/javascript" src="/js/lib/jQuery/jquery.scrollablecombo.js"></script>
<script type="text/javascript" src="/js/lib/jQuery/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="/js/lib/jQuery/jquery.noty.js"></script>
<script type="text/javascript" src="/directory-web/directory/js/main/main.js"></script>
<script type="text/javascript" src="/js/main/tmanager_home.js"></script>
<script type="text/javascript" src="/js/main/main.js"></script>
<script type="text/javascript" src="/js/main/timeline.js"></script>
<script type="text/javascript" src="/js/main/auto_size.js"></script>
<script type="text/javascript" src="/js/main/auto_scroll.js"></script>
<script language="javascript" src="/bms/js/cz/cb/viw/commutil.js"> </script>
<script language="javascript" src="/bms/js/common.js"> </script>
<script language="javascript" src="/bms/js/gpload.js"> </script>
</head>
<body>
<!-- Handy GW 8.0 Wrapper -->
<div id="wrap"> 
	<!-- container -->
	<div id="container"> 
		<!-- toolbar -->
		<div class="toolbar"> 
			<!-- counting -->
			<div id="count_open" class="count_clse">
				<h2><a href="javascript:toggle_div('count')" class="acco_arr">
					<fmt:message bundle='${common}' key='menu.biznotice' />
					</a></h2>
				<ul id="count" style="display: none;">
				<li class="section">
					<h3 class="sect_h">
						<fmt:message bundle='${common}' key='menu.mail' />
					</h3>
					<ul class="sect_mail">
					<li><a href="/wma/fld.do?acton=main&pagename=main_web&navig=unread&key=<%=uai.szKey%>"><span class="fl">
						<fmt:message bundle='${common}' key='mail.count.unread' />
						</span><span class="fr" id="mail_unread">0</span></a></li>
					</ul>
				</li>
				<li class="section">
					<h3 class="sect_h">
						<fmt:message bundle='${common}' key='menu.approval' />
					</h3>
					<ul class="sect_appro">
					<li><a href="javascript:doMenuLoad2('APPRWAIT');"><span class="fl">
						<fmt:message bundle='${common}' key='APPRWAIT' />
						</span><span class="fr"><%=count.getCount("APPRWAIT")%></span></a></li>
					<c:if test="${sessionScope.RECVWAIT eq '1' || sessionScope.ENABLERECEIPTDOC eq '1' }">
						<li><a href="javascript:doMenuLoad2('RECVWAIT');"><span class="fl">
							<fmt:message bundle='${common}' key='RECVWAIT' />
							</span><span class="fr"><%=count.getCount("RECVWAIT")%></span></a></li>
					</c:if>
					<li><a href="javascript:doMenuLoad2('RECVUSER');"><span class="fl">
						<fmt:message bundle='${common}' key='RECVUSER' />
						</span><span class="fr"><%=count.getCount("RECVUSER")%></span></a></li>
					<li><a href="javascript:doMenuLoad2('RECVING');"><span class="fl">
						<fmt:message bundle='${common}' key='RECVING' />
						</span><span class="fr"><%=count.getCount("RECVING")%></span></a></li>
					<c:if test="${sessionScope.EXAMPROC eq '1'}">
					<li><a href="javascript:doMenuLoad2('EXAMPROC');"><span class="fl">
						<fmt:message bundle='${common}' key='EXAMPROC' />
						</span><span class="fr"><%=count.getCount("EXAMPROC")%></span></a></li>
					</ul>
					</c:if>
				</ul>
				</li>
				<li class="section">
					<h3 class="sect_h">
						<fmt:message bundle='${common}' key='menu.bbs' />
					</h3>
					<ul class="sect_board">
					<li><a href="/servlet/HIServlet?SLET=bbs.BBS.java&SEARCH=NEW&K=<%=uai.szKey%>&NEW=on&RANGE=ALL"><span class="fl">
						<fmt:message bundle='${common}' key='NewMaterial' />
						</span><span id="bbsNTL0" class="fr">0</span></a></li>
					<li><a href="/servlet/HIServlet?SLET=bbs.BBS.java&SEARCH=NEW&K=<%=uai.szKey%>&NEW=on&RANGE=ALL&NLT=1"><span class="fl">
						<fmt:message bundle='${common}' key='BUSINESS_USE' />
						</span><span id="bbsNTL1" class="fr">0</span></a></li>
					<li><a href="/servlet/HIServlet?SLET=bbs.BBS.java&SEARCH=NEW&K=<%=uai.szKey%>&NEW=on&RANGE=ALL&NLT=2"><span class="fl">
						<fmt:message bundle='${common}' key='NO_BUSINESS_USE' />
						</span><span id="bbsNTL2" class="fr">0</span></a></li>
					</ul>
				</li>
				<c:if test="${INI_BUSEDCS == '1'}">
					<li class="section">
						<h3 class="sect_h">
							<fmt:message bundle='${common}' key='menu.dcs' />
						</h3>
						<ul class="sect_worknet">
						<li><a href="/dcs/tm/jsp/main.jsp?K=<%=uai.szKey%>&list=notify"><span class="fl">
							<fmt:message bundle='${common}' key='NEWNOTICE' />
							</span><span class="fr" id="notifyCountSpan">0</span></a></li>
						<li><a href="/dcs/tm/jsp/main.jsp?K=<%=uai.szKey%>&list=unread"><span class="fl">
							<fmt:message bundle='${common}' key='UNREADNOTICE' />
							</span><span class="fr" id="unreadCountSpan">0</span></a></li>
						<li><a href="/dcs/tm/jsp/main.jsp?K=<%=uai.szKey%>&list=waiting"><span class="fl">
							<fmt:message bundle='${common}' key='WAITAPPROVAL' />
							</span><span class="fr" id="waitingCountSpan">0</span></a></li>
						</ul>
					</li>
				</c:if>
				<c:if test="${INI_BUSEMEETING == '1'}">
					<li class="section">
						<h3 class="sect_h">
							<fmt:message bundle='${common}' key='menu.meeting' />
						</h3>
						<ul class="sect_meeting">
						<li><a href="/Meetingmanagement/meeting/index.jsp?K=<%=uai.szKey%>&statusMeeting=mymeeting&istoday=true"><span class="fl">
							<fmt:message bundle='${common}' key='meeting.count.todaymeeting' />
							</span><span class="fr" id="todaymeeting">0</span></a></li>
						</ul>
					</li>
				</c:if>
				</ul>
			</div>
			<!-- //counting --> 
			
			<!-- notice -->
			<div id="noti_open" class="noti_clse">
				<h2><a class="acco_arr" href="javascript:toggle_div('noti')">
					<fmt:message bundle='${common}' key='body_notice_name' />
					</a></h2>
				<ul id="noti" class="tlbar_lst" style="display: none;">
				</ul>
			</div>
			<!-- //notice --> 
			
			<!-- poll -->
			<div id="poll_open" class="poll_clse">
				<h2><a href="javascript:toggle_div('poll');" class="acco_arr" title="<fmt:message bundle='${common}' key='body_title_poll' />">
					<fmt:message bundle='${common}' key='body_title_poll' />
					</a></h2>
				<div id="poll" style="display:none">
					<ul>
					<c:import url="/jsp/rsch/PollDisplay.jsp">
						<c:param name="K" value="${UA.key}"/>
					</c:import>
					</ul>
				</div>
			</div>
			<!-- //poll --> 
			
			<!-- schedule -->
			<div id="ini_tmanager"></div>
			<c:if test="${INI_BUSEMYSCHEDULE eq '1'}">
				<div id="sched_open" class="sched_clse">
					<h2><a href="javascript:toggle_div('sched');home_common.closePopup('sched');" id="sched_name" name="sched_name" class="acco_arr">
						<fmt:message bundle='${common}' key='body_schedule' />
						</a></h2>
					<div id="sched" style="display: none;"></div>
				</div>
			</c:if>
			<!-- //schedule --> 
			<!-- to do -->
			<div id="todo_open" class="todo_clse">
				<h2><a href="javascript:toggle_div('todo');home_common.closePopup('todo');" id="todo_name" name="todo_name" class="acco_arr">
					<fmt:message bundle='${common}' key='body_todo_title' />
					</a></h2>
				<div id="todo" style="display:none">
					<input id="todo_text" name="todo_text" type="text" value="<fmt:message bundle='${common}' key='body_todo_add' />" onclick="clickTodo()" onblur="this.value='<fmt:message bundle='${common}' key='body_todo_add' />'" class="input_txt" onKeyPress="if(event.keyCode == 13){saveTodo();return false;}">
					<ul class="tlbar_lst" id="todo_list" name="todo_list">
					</ul>
				</div>
			</div>
			<!-- //to do --> 
		</div>
		<!-- //toolbar -->
		
		<c:if test="${INI_BUSESHAREDNOTICE eq '1'}"> 
			<!-- shared notice -->
			<div id="shared_notice" class="tl_notice_box">
				<c:import url="/jsp/home/motd.jsp">
					<c:param name="K" value="${UA.key}"/>
				</c:import>
			</div>
			<!-- //shared notice --> 
		</c:if>
		<c:if test="${INI_USEHOMEAPPROVALLIST eq '1'}"> 
			<!-- approval -->
			<div class="approval_box">
				<h2>
					<fmt:message bundle='${common}' key='COMMONFORM' />
				</h2>
				<div id="approval_draft">
					<iframe id='home_formdraft_frame' name='FORM_DRAFT_CENTER' height='30%' width='100%' marginwidth='0' marginheight='0' src='/bms/view_apprlist_page.jsp?APPLID=1030&USERID=<%=uai.szUserID%>&DEPTID=<%=uai.szDeptIDWithDocBox%>&K=<%=uai.szKey%>&USERDEPTID=<%=uai.szDeptID%>' frameborder='0' scrolling="no"></iframe>
				</div>
			</div>
			<div class="approval_box">
				<h2>
					<fmt:message bundle='${common}' key='APPRWAIT' />
				</h2>
				<div id="approval_sanc">
					<iframe id='home_apprwait_frame' name='APPRWAIT_CENTER' height='30%' width='100%' marginwidth='0' marginheight='0' src='/bms/view_apprlist_page.jsp?APPLID=2010&USERID=<%=uai.szUserID%>&DEPTID=<%=uai.szDeptIDWithDocBox%>&K=<%=uai.szKey%>&USERDEPTID=<%=uai.szDeptID%>' frameborder='0' scrolling="no"></iframe>
				</div>
			</div>
			<div class="approval_box">
				<h2>
					<fmt:message bundle='${common}' key='APPROVING' />
				</h2>
				<div id="approval_sanc_ing">
					<iframe id='home_appring_frame' name='APPRING_CENTER' height='30%' width='100%' marginwidth='0' marginheight='0' src='/bms/view_apprlist_page.jsp?APPLID=2020&USERID=<%=uai.szUserID%>&DEPTID=<%=uai.szDeptIDWithDocBox%>&K=<%=uai.szKey%>&USERDEPTID=<%=uai.szDeptID%>' frameborder='0' scrolling="no"></iframe>
				</div>
			</div>
			<!-- //approval --> 
		</c:if>
		<c:if test="${INI_BUSEWEEKLYSCHEDULE == '1'}"> 
			<!-- weekly Schedule -->
			<h2 class="tl_title"> <span><strong>
				<fmt:message bundle='${common}' key='weekly.schedule.title' />
				</strong></span> <a href='/hscalendar/jsp/init.jsp?method=main&K=<c:out value="${UA.key}"/>&loc=<c:out value="${cookie.GWLANG.value}"/>&userID=<c:out value="${UA.userID}"/>'>
				<fmt:message bundle='${common}' key='weekly.schedule.shortcut' />
				</a> </h2>
			<div class="schedule_box">
				<div id="weekly"></div>
			</div>
		</c:if>
		
		<!-- timeline area-->
		<div id="tl_box" class="tl_box">
			<div class="tl_box_imgbox">
				<div class="top_img_right">
					<div class="top_img_left"><img src="/img/main/img_main_top_txt.png"></div>
				</div>
				
				<!-- searchbox start -->
				<div class="main_searcharea">
					<div class="main_searchbox"> 
						
						<!-- search center start -->
						<div class="searchbox"> <span class="search_img"> </span>
							<div class="search_ctt">
								<div class="search_selctbox">
									<select>
										<option>통합검색</option>
										<option>글쓴이</option>
										<option>제목</option>
									</select>
								</div>
								<input type="text">
								<a href="#"><span class="main_searchbtn"> </span></a> </div>
							<a href="#"><span class="detail_search"> </span></a> </div>
						<!-- search center end --> 
						
					</div>
				</div>
			</div>
			<!-- work timeline -->
			<div id="tl_work_box" class="tl_work_box">
				<div class="tl_area">
					<h2 class="tl_title"><span><strong>
						<fmt:message bundle='${common}' key='integrated.message' />
						</strong></span>
						<select id="select_appl" onchange="select_application()">
							<option value="">
							<fmt:message bundle='${common}' key='all.messages' />
							</option>
							<option value="Z0000000000000000001">
							<fmt:message bundle='${common}' key='APP_Z0000000000000000001' />
							</option>
							<option value="Z0000000000000000002">
							<fmt:message bundle='${common}' key='APP_Z0000000000000000002' />
							</option>
							<option value="Z0000000000000000004">
							<fmt:message bundle='${common}' key='APP_Z0000000000000000004' />
							</option>
							<option value="Z0000000000000000003">
							<fmt:message bundle='${common}' key='APP_Z0000000000000000003' />
							</option>
						</select>
					</h2>
					<div id="tl_work"></div>
				</div>
			</div>
			<!-- //work timeline --> 
			<!-- SNS timeline -->
			<div id="tl_network_box" class="tl_network_box">
				<c:choose>
					<c:when test="${empty INI_BUSESNS || INI_BUSESNS eq '1'}"> 
						<!-- SNS timeline -->
						<%@ include file ="/jsp/gr_sns/inc_sns.jsp" %>
						<!-- iframe id='SNS_CENTER' style="margin-left:12px;" name='SNS_CENTER' height='100%' width='100%' marginwidth='0' marginheight='0' src='<c:out value="${INI_SZSNSURL}"/>/mainmiddle.action?mem_id=<%=uai.szEmpCode%>&session_id=<%=uai.szKey%>&urlgb=<%=request.getRequestURL()%>' frameborder='0'></iframe --> 
					</c:when>
					<c:otherwise> 
						<!-- BBS timeline -->
						<div class="tl_area">
							<h2 class="tl_title"><span><strong>
								<fmt:message bundle='${common}' key='APP_Z0000000000000000004' />
								</strong></span></h2>
							<div id="tl_work_bbs"></div>
						</div>
					</c:otherwise>
				</c:choose>
			</div>
			<!-- //SNS timeline --> 
		</div>
		<!-- //timeline area --> 
	</div>
	<!-- //container --> 
</div>
<!-- //Handy GW 8.0 Wrapper --> 

<!-- pop user -->
<div id="mainPopUser"></div>
<!-- //pop user --> 

<!-- organization -->
<input type="hidden" id="startDept" value="" />
<input type="hidden" id="baseDept" value="<c:out value="${UA.deptID}"/>" />
<!-- //organization --> 

<!-- search -->
<input type="hidden" id="main_search_webmail" value="<fmt:message bundle='${common}' key='main_search_webmail' />" />
<input type="hidden" id="main_search_bbs" value="<fmt:message bundle='${common}' key='main_search_bbs' />" />
<input type="hidden" id="main_search_dcs" value="<fmt:message bundle='${common}' key='main_search_dcs' />" />
<input type="hidden" id="main_search_aprv" value="<fmt:message bundle='${common}' key='main_search_aprv' />" />
<input type="hidden" id="main_search_user_name" value="<fmt:message bundle='${common}' key='main_search_user_name' />" />
<input type="hidden" id="main_search_user_dept" value="<fmt:message bundle='${common}' key='main_search_user_dept' />" />
<!-- //search --> 
<!-- pop schedule -->
<div id="showPopupSchedule"></div>

<!-- pop to do -->
<div id="showPopupTodo" class="pop_task"></div>

<!-- Action iFrame -->
<IFRAME id="act_frame" style="display: none;"></IFRAME>
<!-- //Action iFrame --> 

<!-- DCS COUNT -->
<c:if test="${INI_BUSEDCS == '1'}">
	<div>
		<iframe height='0px' width='0px' marginwidth='0' marginheight='0' src='/dcs/tm/jsp/countloader.jsp?K=<%=uai.szKey%>' frameborder='0' scrolling='no'></iframe>
	</div>
</c:if>
<!-- //DCS COUNT -->
</body>
</html>